package Data.Diagram;
import java.awt.*;

/**
 *
 * @author Bishal
 */
public class UseCase extends Diagram{
    private String phrase;
    private int xOval;
    private int yOval;
    private float xString;
    private float yString;
    private int width;
    private int height;
    private int startAngle = 90;
    private int arcAngle = 360;

    public UseCase(String phrase, int xOval, int yOval, int width, int height) {
        this.phrase = phrase;
        this.xOval = xOval;
        this.yOval = yOval;        
        this.width = width;
        this.height = height;
        
    }
    
    public void draw (Graphics g)
    {
        Graphics2D g2 = (Graphics2D) g;
        xString = xOval +(float) 0.2*width;
        yString = yOval + (float) 0.5 * height;
        g2.drawArc(xOval, yOval, width, height, startAngle, arcAngle);
        g2.drawString(phrase, xString, yString);
    }

}
